<?php

namespace maotool\core\validate\exception;

use maotool\exception\RuntimeException;

class FormValidateResultException extends \RuntimeException
{

    /**
     * 描述状态
     * @var string
     */
    private $name;

    /**
     * 返回数据
     * @var list<object>
     */
    private $data;

    /**
     * 时间戳
     * @var int
     */
    private $timestamp;
    
    public function __construct($message = "", $code = 0)
    {
        parent::__construct($message, $code);
    }

    /**
     * @param int $code
     */
    public function setCode($code)
    {
        $this->code = $code;
    }

    /**
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * @param string $name
     */
    public function setName($name)
    {
        $this->name = $name;
    }

    /**
     * @return object[]
     */
    public function getData()
    {
        return $this->data;
    }

    /**
     * @param object[] $data
     */
    public function setData($data)
    {
        $this->data = $data;
    }

    /**
     * @param string $message
     */
    public function setMessage($message)
    {
        $this->message = $message;
    }

    /**
     * @return int
     */
    public function getTimestamp()
    {
        return $this->timestamp;
    }

    /**
     * @param int $timestamp
     */
    public function setTimestamp($timestamp)
    {
        $this->timestamp = $timestamp;
    }

}